<template>
  <div class="main">
    <el-tag type="danger" class="tag">
      <p>点击`开始考试`后将自动进入考试，请诚信考试！</p>
    </el-tag>
    <el-card>
     
      <p>考试名称：<span>{{detailobj.title}}</span></p>
      <p>考试时长：<span>{{detailobj.totalTime}}分钟</span></p>
      <p>考试总分：<span>{{detailobj.totalScore}}分</span></p>
      <p>及格分数：<span>{{detailobj.qualifyScore}}分</span></p>
      <p>考试描述：<span>{{detailobj.content}}</span></p>
      <!-- <p>开放类型：<span>完全开放</span></p> -->
    </el-card>
    <div class="footer">
      <el-button type="primary" icon="el-icon-edit" @click="playExam()"
        >开始考试</el-button
      >
      
    </div>
  </div>
</template>

<script>
import { examdetail } from "@/api/table";
export default {
  name: "prepare",
  data() {
    return {
      detailobj: {},
    };
  },
  created() {
    this.examdetail();
  },
  methods: {
    examdetail() {
      examdetail({ id: this.$route.params.id }).then((res) => {
        this.detailobj = {...res.data}
        
          
        
      });
    },
    playExam() {
      this.$router.replace(`/examManage/${this.$route.params.id}/start/${this.detailobj.examId}`);
    },
  },
};
</script>

<style lang="scss" scoped>
.main {
  padding: 20px;
  .tag {
    width: 100%;
    margin-bottom: 20px;
    p {
      line-height: 100%;
      padding-left: 15px;
    }
  }
  .footer {
    margin-top: 20px;
  }
}
</style>
